<?php
include_once('config/config.php');

$LoginAdmin = checkAuth();

$action = $_GET['action'] ?? '';

// 退出功能
if($action == 'logout')
{
    // 清除cookie
    setcookie('LoginAdmin','',time() - 1);
    showMsg('退出成功','login.php');
}
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- 引入样式 -->
    <?php include_once('common/meta.php'); ?>
  </head>

  <body>
    
    <!-- 引入头部 -->
    <?php include_once('common/header.php');?>
    
    <!-- 引入菜单栏 -->
    <?php include_once('common/menu.php'); ?>

    <div class="content">
        <div class="header">
            <h1 class="page-title">后台首页</h1>
        </div>
        <ul class="breadcrumb">
            <li><a href="index.php">Home</a> <span class="divider">/</span></li>
            <li class="active">Index</li>
        </ul>

        <!-- 引入底部 -->
        <?php include_once('common/footer.php'); ?>
    </div>
  </body>
</html>
<!-- 引入js -->
<?php include_once('common/script.php'); ?>